﻿@model Alma.Models.ProductDetailsModel

@{
    ViewContext.Controller.ViewBag.Breadcrumb.Enter("Mon profil", "Edit", "User", new { id = Session["UserId"] });
    ViewContext.Controller.ViewBag.Breadcrumb.Enter("Création d'un produit");
}
<div class="fullcol">
<h1>Création d'un produit</h1>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.ID_Shop)
        <dl>
        <dt>
        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        </dt>
        <dd>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>
        </dd>
        <dt>
        <div class="editor-label">
            @Html.LabelFor(model => model.Name_Section)
        </div></dt>
        <dd>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Name_Section, (ViewData["drop_section"] as SelectList), "section")
            @Html.ValidationMessageFor(model => model.Name_Section)
        </div>
        </dd>
        @*        <div class="editor-label">
            @Html.LabelFor(model => model.Name_Shop)
        </div>
        <div class="editor-field">
            @Html.DropDownListFor(model => model.Name_Shop, (ViewData["drop_shop"] as SelectList), "select shop")
            @Html.ValidationMessageFor(model => model.Name_Shop);
        </div>*@
        <dt>
        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        </dt>
        <dd>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        </dd>
        <dt>
        <div class="editor-label">
            URL de l'image
        </div>
        </dt>
        <dd>
        <div class="editor-field">
            @Html.EditorFor(model => model.ImgUrl)
            @Html.ValidationMessageFor(model => model.ImgUrl)
        </div>
        </dd>
        </dl>
        <p>
            <input type="submit" value="Créer" />
        </p>
}

<div>
     @Html.ActionLink("Retour au profil", "Edit", "User", new { id = Session["UserId"] }, null)
</div>
</div>
